<?php

/**
 * Not really used for anything except for testing...
 */
class User_AjaxController extends Pldkp_Controller_Action
{
    /**
     * This is just a test action for ajax functionality
     * @return unknown_type
     */
    public function getUsersAction()
    {
        $users = array();

        foreach (User_Model_Users::getAll() as $user) {
            $users[] = array(
                'id'    => $user->id,
                'name'  => $user->name,
                'email' => $user->email,
            );
        }

        $users[] = array(
            'id'    => '423',
            'name'  => 'invalid',
            'email' => 'hest@mail.com',
        );

        echo Zend_Json::encode(array('status' => 200, 'data' => $users));
    }
}